import request_noerror from '@/utils/request-noerror'
import request from '@/utils/request'

const prefixUrl = "web/message";

// 分页列表
export function list(params) {
  return request({
    url: prefixUrl + '/list',
    method: 'get',
    params
  })
}

// 设置已读
export function set_has_read(data) {
  return request({
    url: prefixUrl + '/set_has_read',
    method: 'post',
    data: data,
    content_type: 'json'
  })
}

// 未读消息个数
export function get_own_unread_count() {
  return request_noerror({
    url: prefixUrl + '/get_own_unread_count',
    method: 'get'
  })
}